﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class WorldMapBaseCollisionCircleSimpleBoolCollisionDataWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(WorldMapBase.Collision.CircleSimpleBoolCollisionData);
			Utils.BeginObjectRegister(type, L, translator, 0, 6, 0, 0);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnUpdate", _m_OnUpdate);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateListeners", _m_UpdateListeners);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddCollision", _m_AddCollision);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveCollision", _m_RemoveCollision);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddListener", _m_AddListener);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveListener", _m_RemoveListener);
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					int _gridSize = LuaAPI.xlua_tointeger(L, 2);
					
					var gen_ret = new WorldMapBase.Collision.CircleSimpleBoolCollisionData(_gridSize);
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to WorldMapBase.Collision.CircleSimpleBoolCollisionData constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))
				{
					int _gridSize = LuaAPI.xlua_tointeger(L, 1);
					
					var gen_ret = new WorldMapBase.Collision.CircleSimpleBoolCollisionData(_gridSize);
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to WorldMapBase.Collision.CircleSimpleBoolCollisionData constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnUpdate(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Collision.CircleSimpleBoolCollisionData gen_to_be_invoked = (WorldMapBase.Collision.CircleSimpleBoolCollisionData)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.OnUpdate(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UpdateListeners(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Collision.CircleSimpleBoolCollisionData gen_to_be_invoked = (WorldMapBase.Collision.CircleSimpleBoolCollisionData)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.UpdateListeners(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddCollision(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Collision.CircleSimpleBoolCollisionData gen_to_be_invoked = (WorldMapBase.Collision.CircleSimpleBoolCollisionData)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    float _x = (float)LuaAPI.lua_tonumber(L, 2);
                    float _y = (float)LuaAPI.lua_tonumber(L, 3);
                    float _r = (float)LuaAPI.lua_tonumber(L, 4);
                    
                    gen_to_be_invoked.AddCollision( _x, _y, _r );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RemoveCollision(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Collision.CircleSimpleBoolCollisionData gen_to_be_invoked = (WorldMapBase.Collision.CircleSimpleBoolCollisionData)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    float _x = (float)LuaAPI.lua_tonumber(L, 2);
                    float _y = (float)LuaAPI.lua_tonumber(L, 3);
                    float _r = (float)LuaAPI.lua_tonumber(L, 4);
                    
                    gen_to_be_invoked.RemoveCollision( _x, _y, _r );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddListener(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Collision.CircleSimpleBoolCollisionData gen_to_be_invoked = (WorldMapBase.Collision.CircleSimpleBoolCollisionData)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    WorldMapBase.Collision.CircleSimpleBoolCollisionData.IDataChangeListener _listener = (WorldMapBase.Collision.CircleSimpleBoolCollisionData.IDataChangeListener)translator.GetObject(L, 2, typeof(WorldMapBase.Collision.CircleSimpleBoolCollisionData.IDataChangeListener));
                    
                    gen_to_be_invoked.AddListener( _listener );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RemoveListener(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                WorldMapBase.Collision.CircleSimpleBoolCollisionData gen_to_be_invoked = (WorldMapBase.Collision.CircleSimpleBoolCollisionData)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    WorldMapBase.Collision.CircleSimpleBoolCollisionData.IDataChangeListener _listener = (WorldMapBase.Collision.CircleSimpleBoolCollisionData.IDataChangeListener)translator.GetObject(L, 2, typeof(WorldMapBase.Collision.CircleSimpleBoolCollisionData.IDataChangeListener));
                    
                    gen_to_be_invoked.RemoveListener( _listener );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        
        
		
		
		
		
    }
}
